<link rel="stylesheet" type="text/css" href="{$basePath}/css/MyFontsWebfontsOrderM3004233.css" />
<link rel="stylesheet" media="screen,projection,tv" href="{$basePath}/systemApps/celebrionews/default.css" type="text/css" />
<script type="text/javascript" src="{$basePath}/js/libs/jquery.js"></script>
<script type="text/javascript" src="{$basePath}/js/apps/jquery-ajax.js"></script>
<img src="{$basePath}/images/spinner_150.gif" class="invisible" />

<script type="text/javascript">
    //var countryNameCode;
    $(document).ready(function(){
        //getCurrentLocationCountryNameCode(); -- location
	if (typeof document.body.onselectstart!="undefined")
	    document.body.onselectstart=function(){ return false }
	else if (typeof document.body.style.MozUserSelect!="undefined")
	    document.body.style.MozUserSelect="none";
	$(document.body).bind("contextmenu", function(e) {
            e.preventDefault();
	    return false;
        });
    });
    function celebrionewsappLink(owner,url) {
	$("#celebrionewsapp_menu li").width(300);
	$(owner).width(310);
        //param = "location="+countryNameCode; -- location
        //url = url+"&"+param; -- location
	$.getJSON(url, {}, function (payload) {
	    $("#celebrionewsapp_contents").html(payload.snippets["snippet--celebrionewsappSnippet"]);
	});
	$("#celebrionewsapp_contents").html('<img src="{!$basePath}/images/spinner_150.gif" alt="{!_"Loading"}" class="spinner150" />');
	return false;
    }
    
    /*function getCurrentLocationCountryNameCode() { -- location
        if(navigator.geolocation) {
            browserSupportFlag = true;
            navigator.geolocation.getCurrentPosition(function(position) {
                var latlng = position.coords.latitude + "," + position.coords.longitude;
                var apiurl = 'http://maps.google.com/maps/geo?output=json&sensor=false&q=' + latlng;
                var yqlqry = encodeURIComponent('select * from json where url="'+apiurl+'"');
                var yqlurl = 'http://query.yahooapis.com/v1/public/yql?q='+yqlqry+'&format=json&callback=?';
                $.getJSON(yqlurl, function(data) {
                    countryNameCode = data.query.results.json.Placemark.AddressDetails.Country.CountryNameCode;
                });
            }, function() {
                handleNoGeolocation(browserSupportFlag);
            });
        } else {
            return US;
        }
    }*/
</script>

<div class="celebrionewsapp" id="celebrionewsapp">
    <div id="celebrionewsapp_menu">
	<ul>
	    <li onmousedown="celebrionewsappLink(this,{link Default:default});" onclick="return false;"><a href="{link Default:default}" title="{!_'Home'}"><strong>{!_"Home"}</strong></a></li>
	    <li onmousedown="celebrionewsappLink(this,{link Default:iframe, 'type'=>'topstories'});" onclick="return false;"><a href="{link Default:iframe, 'type'=>'topstories'}" title="{!_'Top Stories'}"><strong>{!_"Top Stories"}</strong></a></li>
	    <li onmousedown="celebrionewsappLink(this,{link Default:iframe, 'type'=>'world'});" onclick="return false;"><a href="{link Default:iframe, 'type'=>'world'}" title="{!_'World'}"><strong>{!_"World"}</strong></a></li>
	    <li onmousedown="celebrionewsappLink(this,{link Default:iframe, 'type'=>'entertainmet'});" onclick="return false;"><a href="{link Default:iframe, 'type'=>'entertainmet'}" title="{!_'Entertainmet'}"><strong>{!_"Entertaiment"}</strong></a></li>
	    <li onmousedown="celebrionewsappLink(this,{link Default:iframe, 'type'=>'sports'});" onclick="return false;"><a href="{link Default:iframe, 'type'=>'sports'}" title="{!_'Sports'}"><strong>{!_"Sports"}</strong></a></li>
	</ul>
    </div>
    <div id="celebrionewsapp_body">
	<div id="celebrionewsapp_contents"><div class="celebrionewsapp_contents2">
	{snippet celebrionewsappSnippet}
	@{include #content}
	{/snippet}
	</div></div>
    </div>
</div>